Fix NPE when a service provider fails to list its services

This should fix https://bugs.freenetproject.org/view.php?id=5324
Merge remote-tracking branch 'bertm/fix-5324'