localhist: add border regions. fix dmax / dmin test for dmin = 0. reduce logging.