Fixed issue with large number of media srouces in sources.getlist

Fixes #12215, not tested.