Fixes so that on the fly scanning works when DB Rebuild is limited (i.e. >1)