Absolutely no idea why I got a negative vote on this. Turns out this is actually a bug in wordpress: https://core.trac.wordpress.org/ticket/15533
The solution is to use “object” instead of “array”.
$args = array(
'orderby'=> 'title',
'output' => object);
Hope it helps someone else.