Allow the return of InsertId directly after insert or update #866