this is wasted effort if there's a single pattern in the array.  It seems like we need something smarter here to not bother to do this check