reconstruct_lost_records.py: fix div by zero bug