Get innermost analysed term for resolution expectation, outermost analysed term for build/run expectation.