Port of andreasdr's small bug fix in original java class BoundingBox.