Fix and add test for changes analysis.