A couple of related posts:
It seems that your functional solution (using a system.tag.write* function) is the preferred method.
system.tag.write*