comment /cosmetics
remove redundant flush_messages call
validate_row(): check for existing entry only once (not once per column)