Fixed a bug in transformation of AstRule to Rule.