At present, for some insertion patterns, Reference nodes may be left behind within shards after they are no longer needed. This is particularly the case when a frontier is inserted in a location that has already had a pruning operation applied; in such a circumstance, the frontier will be retained all the way down to its leaf. Removing the Reference annotation on the resulting leaf will not necessarily result in the leaf being pruned, because any Nil ommers will prevent the pruning from progressing.
What is needed here is the ability to remove the Reference retention, and then subsequently run a clean operation that removes fully-ephemeral (but incomplete) subtrees of internal nodes for which the root hash is known.