Check-in of modifications to fix bug with ignoring non-autoinc key