Reset arguments in theorem definition to avoid argument clash (#8827)