Fix crash on dropping view during teardown