correct TR8 rule; use xreplace instead of replace

Also use recursion in TR8 if new products were introduced.