MDL-46934 webservice_rest: Fixed undefined index on XML output