Remove duplicate code, Term::Detect already does this