Prevent SI-7905 by adding a test

The original issue was fixed already. This test is just for make sure.
Merge pull request #3900 from kzys/jira-7905

Prevent SI-7905 by adding a test just in case