Bug 961194 - Pull out stack utils in loader to prevent circular dependencies in SDK