set merge policy on basic stack context
Add helper for obtainPermanentObjectIDs
code cleanup