Add a test for the duplicated-conditional situation illutrated by PR5652.