Test for, and fix the handling of, some cases I forgot.