Fix bad codegen in AS3 caused by TCast