Follow-up of #4808, same fix applied to ToXContent.MapParams