Working version without duplication (bugfix in vertex-tag management).