IWBNI there were some kind of a comment explaining why child_history must exist here in order for the methods below to be successful.  The test is relatively far away from the place that it's used.  (And I don't know which "record_X" call below is the one that would fail.)