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

Change-Id: I821aba22236152a8a0230a0db7a3710ad7731d12