Improve modernizer.xml validation

Also correct test.