Fix the excluded node code to work when tag attribute doesn't exist

avoids a nil error