attempt to optimize the ancestor calculation
attempt to make deadlock happen early