Fixed over-peeling of tags in local add_ref implementation