Swap order of lookup_name in frame_name

This direction is more efficient - frame.lookup_name(graph) is slower than graph.lookup_name(frame)