In reply to Steve Roe:
This small example worked for me.
class env #(type P, type V);
type(V::bus_loopback_vif_t) bus_loopback_direct_vif;
endclass
module top;
class B;
typedef int bus_loopback_vif_t;
endclass // B
env#(int,B) e;
endmodule
Can show a small example that fails for you.