Fix tag exporting, make undo work with tags.

Signed-off-by: Max Sikström <msikstrom@op5.com>