fix issue 11784

Actually add a test case, the issue was fixed as part of the set
of commits that precede this one.