In some self-referential scenarios, renaming can get the references table out of date.
To reproduce the bug:
the reference test above works now. closed.