small algorithm improvement to help with the end of tables: no point requesting a hash of more rows than we have