Fixed concurrency issue in simple id cache.

The lget() of a map can only be used if the map isn't shared. This issue concurrency issue occurs in none of the released versions and only exists in the master and 0.90 branch. Also only the `top_children` query is affected.