split the slow part of lock_parent() off