Change LinearizeAll to return a list (not a set)