Commit bce99086 (#12584) fixed #12788. Let's add a test to make sure it stays fixed. (cherry picked from commit ec22bacd)