Fix -flatten cycle

Fixes the `-flatten:` leak in #258.

Two blocks were both capturing each other.