MDL-44342 Move user deleted checking after capability checkings