GRADLE-3136: Added test that reproduces issue.