Remove the remaining dependencies on internal structures from Invoke.