Merge "Correct lastId on onCreate with unexpected state" into oc-dev
am: aed0c10d52

Change-Id: I2197920ee7d6483276473129e74fd9527162dc0a