Optimize substitution driver method
Optimize substitution driver method

At the beginning of the function, now all execution is skipped when the
base to be substituted is tested to be absent in the tensor.

tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge