replace transform_skip_flag with local context variable