[modules] Simplify reading of INPUT_FILE_OFFSETS record and make it robust against changes to record order.