patch should merge, not replace
Caching was unwiring children from the root/parent on replace