Added support for ignoring array order and for ignoring extra values.