Seems plausible. I would like an automated test if this is the right approach. Sort of fixes #647.
Re-read the bug, and this is closer to what we want.