Fixes for NPEs caused during GradleDSLDTests