Added code to retain the instance that a ClassElement is derived from