Fix ability to define rules as closures