Fixed issue where namescope was not initialized for app when attaching the root visual.