Fix exporting local variables and members as static.
Don't export attributes for template classes.