Some more test cases for #1937 copied from dup issue #1931