OPAL-2682 Make sure variables created from the data file have the same entity type as the reference table