For features, I'd prefer if we use `CDenseFeatures::obtain_from_generic(CFeatures*)` to do the cast. It is not the same as for tree nodes because for the latter we don't have such methods.