Fix handling of empty ranges in delta