Madness? Madness?! THIS IS MEDIAWIKI!

$out can be null and will likely be removed in a future version of
MediaWiki, so it's unsafe to rely on it, because doing so will generate
fatals. So here's a monkey patch to work around that.

Change-Id: Icb9f88cbfff6081c22c311b01091487338d23fe3