Fix KeyError during lock reacquire (OMS-560)
Merge branch 'oms-560'