XD-650 Ensure a clean build after running gradle->refresh

Fix for XD-650