v12-450.392: Optimise MAP handling and fix memory leak on MAP disconnection.