This code should be put in the else block below which has comment "// The path is longer or potentially unreachable, full plan."

One the other hand we dont /really/ know if the path is partial. The path query above is a used return short paths quickly. If a path does not exists, then the short path is used during the actualy path query. So the path is indeed partial, but if the partial flag is used to check if the agent can move to the actual requested goal, then we should not set it here at all.

I think we should not set the partial flag here.