fix(ChangeDetector): fix issues with handling empty ranges