It was leaving some important cases out. BUG: 470372
mentioned in commit db775ce9
mentioned in merge request !574 (merged)
mentioned in commit 617b9e4a