In this class you are modifying, there are other instances of OperationContextScope. You may want to fix them as well the way you are fixing it here.