Use stack for LocatorContext instead of using heap