Issue #3497935 by prudloff, smustgrave: Renderer::getCurrentRenderContext() triggers a TypeError when there is no current request (cherry picked from commit e7bb6157)