core: retry acquire of dotlock [GH-3735]