[checkmk-commits] Moved lock to smaller scope. Removed default arg. Inlined function.