Fix small boundary bug in dynamic logging.