Fix: Change with_index to maintain 1.8.7 compatibility