It's fixed in recent gradle versions, I should have checked. Spent a week upgrading our gradle version (we had compile declarations, was the main thing blocking us - changing them over was tedious work and I didn't want to just make everything api), now it's super.