Multiple ids now handled correctly

Hi,

This changeset fixes an issue with the handling of multiple ids.

I've been using your weave sync server to develop a client. Its been a great help, much appreciated.

--Gerry