Yes, there are conflicting specs. The OP now states that if two patterns are equal, it simply returns one of them (ie, the whole thing matches). If you want the other behavior, look
and you'll see where I solved it (and saouq complained about it, leading to the solution you're now criticizing).