Added the an integrity check to check for attribute option orphans (#1237)