[ledger] fix accidental eager loading of ledger file in macro