stop using List::MoreUtils::first_index

This removes List::MoreUtils from being a prerequisite, without significantly effecting the clarity or length of the code.

I think it's worth avoiding extra prerequisites for toolchainy things like this, especially given List::MoreUtils' uncertain future.