Merge "Detach children in transaction." into pi-dev