cleanup switchToResourcesParentIfRequired hack

closes #2223