Prevent SI-8314 by adding a test

The original issue was fixed already. This test is just for make sure.
Merge pull request #3904 from kzys/jira-8314-2.10.x

Prevent SI-8314 by adding a test