This also fixes a bug where issuing a new "workspace a output b" command
for an already assigned workspace would not work (the old config would
be found first and used instead).
Sometimes one has to traverse a list to find out if some data already
exists there in order to avoid dupilcates in the list, and this function
facilitates in that without requiring that the data is ordered.