Merge "Detect and repair invalid layouts in the navigation bar." into ics-mr1