GRADLE-3147: Initial test case reproducing the issue. Added spec that lays out test scenarios.