Fixed a very hard to detect bug in GenericAsyncRendererFactory. Also added test code for it.