Something went wrong in #12068 so this didn't work. Also added a test. (cherry picked from commit 77d4316353)
77d4316353