Add a test for the regression fixed in 6f58f102
As promised on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=909740.
I have confirmed that this test passes before !5 (merged), fails after !5 (merged) but without 6f58f102, and passes with that commit.