Took me a *long* time to track down this bug.