add debug flag to mbus_scan_2nd_address_range, add some comments, fix scanning bug