Fix regressions changing type of ledger_index from (signed 32bit) integer to long