The $view_data array passed in $left = idx($view_data, 'left') can obviously be null as there is a if (!$view_data) check a few lines above.
Thus make idx() silently return 0 as default value which does not fix the unknown root cause but still seems better than returning an empty array which inevitably leads to a crash.
Closes T15638