Fix issue #11 [Matching] Crash if empty arrays. Bug fixed and unit tested added.