Fix wrong tests.

If those tests fail again, double check the correct result of these tests.
Rewrite the method focusing on literals matching
If $set cannot attach a property, throw an exception