Generate FIRST-based optimization if FIRST contains no more than N tokens.