Add a test for LWG issue #2399. We already implement this, but now we have a test as well.