Added test case that reproduces GRADLE-3216.