Enforce the correct write order for ancestor-descendant pairs