the tests should be swapped so position at `tag->len` isn't tested.  Though, since `tag->str` is 0-terminated, it's no real problem.