(maint) Make benchmark:defined_types work on 3.4.2

This changes the use of lookup to creating an Environment.