Revert "Bug in makerule - and make it compatible with if/ifvarclass."

This reverts commit 44c0465ff866edf953b15b978e910df00373cf1e.

makerule acceptance test failed in 3.6.x with this change, so
taking this only into master.