Finished changes for InvokeDynamic as added by Charles Nutter.