solve deep rewrites in function rules in java backend
Merge pull request #1222 from dwightguth/nestedrewrite

solve deep rewrites in function rules in java backend