CommonFile: moved 'findMaximalPrefix' to its only use in Compiler.compile