Execute legacy behaviour in Tesla only for legacy data types
This fixes a problem running Tesla in MC productions, reported by @decianm in LHCBGAUSS-1190.
I've target 2017-patches as that's what the DaVinci version used for the MC productions is based on (v42r7p3), but this MR should also be propagated to 2018-patchesl