Adds linking phase that for each method invocation places a proper
reference, possibly inherited from superclass. Adds tests on ArrayList