Issue #86: Fixing upgrade path for layouts to avoid Layout APIs that are not available during major upgrades. Fixing a number of layout-related tests.