Commit ce97b729 (the fix for #12175) also fixed #12648. Let's add a regression test so that it stays fixed.