Fix custom java files sometimes not being compiled.