Fix crash in RenderDevice cache lookup