[automerger] Do not run StateHandler code while holding the lock am: f46779fe01 am: bda981419c

Change-Id: I90c280ebe5868ffc92618134802c95f7acc2b4c3