Fixed #23712 -- field_name no longer raises KeyError

`field_name` was added in 053de6131af83c (#5749) to the part that
builds the output list but not to the part that inserts hidden fields
to the last row when the last row doesn't end with `row_ender`.

Added the `field_name` to the dict in said location.
Same as above: try using `assertInHTML()` to make the test deterministic.