Fixed various high-level bugs. Mainly retry-counter-things and location designator resolution details.
[plan_lib] merging Jan's fixes