Ensure `view` is defined before triggering `afterRemove` hook