Fix an obscure Substitute-related crash