Add missing tests from @FWennerdahl's patch