Optimization: in case of empty substitution, merging is trivial.