do not change internal properties in invalidateSize() when !map._loaded

Fixes #2249