KRACOEUS-7546 continue fixing notes

My original fix for the notes did work, but when I tried to validate this AM it was no longer working, and continued to throw the class cast exception.  I reviewed the fix and it was on master.  As the current code shows, I moved the attribute definition down to in an IF statement, so it only gets called when applicable.  Seems to have fixed it.