Add support for class deoptimization due to ref before def.