GRADLE-2918: Added test case that reproduces the issue.