Regression test for issue #2264