Made the retry a little smarter when MediaFactory.GetService fails.

Fixes #2620.