Fix SQL that was attempting to insert a record with id=1 when one was likely to already exist