Use labeled breaks instead of "done" flag in loops containing switches