Fix IMain.originalPath()'s compatibility with 2.10

Previously macro tests failed because $display object failed
to compile, because paths to objects were resolved improperly.