Better dynamic upstack resolution