Fix API handling of tools containing repeat statement with min set.