Fix RHBZ#503169 comment 13 (regression) and add a regression test.