Fixed const_defined issue where it was checking ancestors