Fix tag handling

Hi.
HandleTagNameMixin::filter_record has side effect.
So when some records emitted, add_tag_prefix/remove_tag_prefix is modified previous records too.
I fix the bug, and add test code.