Cherry picked fix for restoring map from MWEB-798

The fix was in MWEB-798 branch which didn't merged yet to dev