finish adding stack-compacting for resource-lists
fix a potential threading/race issue in template manager -- potential
access of client-side resource from server