A few names were incorrectly mangled, which made --protect-ids produce invalid output when certain SV class constructs were uses. Now fixed and added a few extra tests to catch this.