WyRL: fixed several bugs in StrategyRewriter for #382