Another 'lng of undefined' bug
Fixed 'Attempted to add layer undefined while it was already part of the map'