Adapted to changed location of ReflectionTrait.