ensure array keys don't cause errors

Array keys don't have a match method, so just skip them.
tweak doc