ustack helper: fix stub frames and frames with undefined Scripts