Handle memory issues more gracefully in NonAcceleratedOverlay.