Used the wrong wrapper for some parts of the getMethodInvocations method.