Fix ruminate-merging-nodes.

It was writing to the phantom layer with head-ids instead of with
phantom ids.
Add some tests asserting that you can write to a node after it's merged