Merge "Fixes an issue where the ambient layout could be null"