Bug with promise resolving in L.gmx.loadMap