Fix handling of "Fit" zoom values in setHash (issue 5581)

Tentative patch to fix #5581.
Fixed.