Merge "Account for horizontal offset when calculating borders"