Deep replication wasn't constructing pre and post data structures correctly