Isn't this just by allowing clicking on certain "error save" areas?
In case of your example, a function should test how close the point is to a wall, and if it is too close, it should disable clicking and change the pic of the mouse pointer accordingly.

My guess is that the pathfinding entity is already in the block, and because of that, it can trace to the point above that block.