Fix a crash when accessing a map not active anymore. Fix #371.