envelope: fix handling of ircv3 tags.  pointed out by @grawity.