Fix a recursive lock acquisition regression.

Fix a recursive lock acquisition regression, which was introduced by
8bb3198f72fc7587dc93527f9f19fb5be52fa553 (Refactor/fix arenas
manipulation.).