More structure to handle <locations>. re #6181