Fix tag insertion. Make the table and its data into ERB.

(Still to come… more code tidying!)
[Fix #49266279]