I think this placement might be a problem, because there are a number of call sites which call doReadObject(int, boolean) which would essentially bypass this resolution.

I think you may have to either edit the main doReadObject method, capturing every return statement, or else wrap the whole method with a method that does the substitution (though this will reduce the maximum stack depth that can be achieved).