Fixed working with memoised rules.
Further fixes.  Now *slower* ?!?
Fixed speed problem. Some tests still reporting problems.