Wrong variable used inside the block of #concat_records

The loop variable was not properly used in the #concat_records method. Fixed the wrong argument while calling the method #insert_record.