Replaces .some() with .indexOf() where appropriate

A couple of places there were some loops inside of loops when a simple `.indexOf` would suffice. Saves a couple hundred milliseconds on a big project.