Fix crash after deleting automation region views (#4718).