Set locked state while locking for grab.

Change-Id: If4b8fa77e6e3a288487a011e83791ad6a189675c
Reviewed-by: Manish Sharma <83.manish@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>