Fix a case where zoomToShowLayer wouldn't work (ref #286)