Fix a segfault on map change. (bbb4a0b0)