I think this should be 0, because the end of a region is exclusive. This means I think the check should be:
```
d.get == 0 && !overlaps(region)
```

Also, it would probably be easier to use a match expression for this:
```
distance(region) match {
   case Some(d) => d == 0 && !overlaps(region)
   case None => false
}
```