Tria: Tests for c574f6d1068ab44521aba9cc0bbb80caf82e2915

1) Make sure typedefs stay typedefs, don't refer to their real type
2) Make sure that templates are correctly saved