Fix another crash on entity removal.