Improved the check for a row being already present in the set of short
prefix rows.