Indeed the 'asInstanceOf' was not necessary, blaming this mistake into SBT not always properly detecting changes in path-dependent types, therefore not always recompiling what should be recompiled.