Try to fix issue #12180, Added a if statuement to prevent creating duplicated through_records