Fix the ability to use gesture recognizers to switch between layout modes.