Fixed get_panel iteration and cleanup

get_panel was iterating over level 1 values and, consequently, repeating a lot
of values.  Used sorted(set(foo)) to fix that.