Avoid repeatedly scanning the list of extensions