getMethod() blocked on MissingMethodException?

I've been writing some library code that catches a MissingMethodException and calls getMethod() to check the name of the method for which the call failed. This was working about a month or so ago, but recently trying to recompile and save my driver code I'm now getting the error:

Expression [MethodCallExpression] is not allowed: e.getMethod() 

The block of code causing this error is:

def invoke(methodName, ...args) {
    try {
        return this."$methodName"(*args)
    } catch (MissingMethodException e) {
        _modbus_logDebug "invoke() exception caught: ${e}";
        if (e.getMethod() == methodName) {
            _modbus_logWarn "No ${methodName}() method";
	        return null;
        } else {
	        throw e;
        }
    } catch (e) {
        throw e;
    }
}

This has been blocked as part of some kind of tweak to the sandbox security? Annoying if this is the case. Can anyone confirm?

My hub is currently on platform version 2.5.1.183

Tagging @gopher.ny from the Hubitat Team.

Yes.

Fair enough IMO.

Could I put in a request for better documentation of what user code can actually reach in the sandbox? As an example, I once used reflection to work out what the zigbee object exposes. The docs are thin there and there's plenty of community code referencing cluster/attribute constants and even some methods I couldn't find documented anywhere. That route's closed now, which is fine, but it does mean documentation is the only way left to find out.

Thanks for confirming. I don't suppose there are any other options for me to do what I wanted? Specifically, my library code intends to call a handler function that a driver can optionally provide. If the function does not exist then I want it to fail gracefully without an error. If the function does exist but there is some other exception raised during that function call, then I'd want to be able to either re-throw the exception or log it.