Fix bug when double-specifying a shader parameter and restoring to original