flagAsModified should be private
Bug #1060: Fix incorrect spell type checks