Fixed an issue with invokevirtual on values of type B extends A stored in an A ref