Fixed a rules ignoring problem

Reported by: anikeev@ut.mephi.ru