Fix for optional tag sets vanishing on edit

Fix for issue 2729: optional tag sets vanished on edit. As you can see, MASSIVE amounts of code. :P Test added to the challenge feature, ran clean
https://code.google.com/p/otwarchive/issues/detail?id=2729 

Signed-off-by: shalott <shalott@gmail.com>