Searches recursively for an attribute within a class