This looks too coupled to the XML-RPC implementation, but it's probably something that needs to be fixed in #1521.