Its because at the time the call is made, there is no possible path that can be followed that will take the character to the destination.
Take a look at this fantastic example I slaved away at and made:
If the calls is made when the events block the path like that, the system begins searching for a path to the destination, but it can never get further than its small area up top where it is blocked into, therefore the pathfind is unsuccessful.
You can try a few things.
The easiest would be to not create situations like that. Its an automated search algorithm written in Ruby, not true intelligence, therefore stupid little things like that can screw it up.
Second, although I have not tested it, would be to increase the range in the script call. Just because it is allowed a range of error does not mean that it will quit the second it gets within it; it will still try to reach the exact target.
Third, and this is flirting with disaster a bit, and risking a hanging script would be to call the pathfind again as a failure proc. You will definitely want to test this solution vigorously if you decide the other two won't work and are going to use it.
I'll see if it is a viable option to provide some type of fix for this without breaking the scripts normal functionality, maybe some type of "at least go as far as you can" type procedure for characters to follow.