Prevent panning to left or right if the corresponding controller is nil.