Added instrumentCache to allow caching of identical code within a test, or
when rerunning a test.