A better implementation of multiple instances sniffs

It based on the idea of having an optional "id" attribute in "rule" element.