[WIP] Fix shape cycle

I'm still working on a lightweight example to use as a test.