Fix a bug where subs() forgets noncommutativity
Merge pull request #2774 from zanzibar7/bug_noncommutative_subs

Fix a bug where subs() forgets noncommutativity