Fixed #19872

Made cached_property to behave as property when accessed via class.