Apparently, the change and test I added before didn't quite cover the corner case that was broken. This does, and exposes a second bug as well, which we fix.