Fixed bug where the last select multiple would overwrite others in the same group - fixes #1169