merge parseref into searchstack, as all parseref calls either precede or follow a searchstack call