Fixed a bug in validation of use-rules; added more tests