Yes, will do that, but it might be hard to track if there are any side effects.
It’s always a bit uncomfortable to just remove something without really knowing if it should maybe be done in another way.
Having this in your old code looked more like “somebody found a bug and did not report it, instead they added a workaround for something that should have been fixed by the Framework”.