Invalidate shaderkey when necessary