Fix #846; check whether a const or method is set

During the setting of a package will all child elements also be set;
sometimes one of those children is not a descriptor (addressed in #840)
and must the setting be skipped in this case.