Ensure ids clause is a list for concatenation

issue3949
review11281006
(grafted from 4f0c0b43e6a70823126f76e8c814c4b60cdf2bb2)

--HG--
branch : 3.0
extra : source : 4f0c0b43e6a70823126f76e8c814c4b60cdf2bb2
XML-RPC dumps None to nil instead of bool

issue3981
review6351003
(grafted from 851a0446f64dea53fcee27dce1ea16e6f06b7b46)

--HG--
branch : 3.0
extra : source : 851a0446f64dea53fcee27dce1ea16e6f06b7b46