Apply patch from renderingcache branch