Fix FIFO indexes for database lookups.