Yep. I also don't see any memory leak. I guess, that this extra locking is
essential for the work of functions as lvalue. pos and vec cause the same
behaviour. The variable is locked as many times as there are usages of
function as lvalue. Then it is not a bug, but just a feature.