Fix TerrainCallbackAdapter to automatically discard dead callbacks