collect all switches in a policy; make sure we don't miss a switch even in the degenerate case where a global program does not contain any links