Fix for bug #1600 - multiple selects were being serialized incorrectly.