Fix lastInsertedRowID property on tables