Fixed dead end issue with LPAstar