Deleting attributes deletes associated shadow attributes

There was a bug causing "zombie" shadowattributes to stay in events if the attribute has been deleted
Merge branch 'hotfix-2.1.18'