Is there a reason to keep this structure?
You can remove this by going to the navigation tree in the email designer and removing it.
Also, the advanced expression that checks stateCode='QB' you mentioned can't be used in dynamic conditions.
<% if(context.profile.location.stateCode === 'QB') { %>
...