More tests based on bug found by japhb.