Fixed regression in (thio)amide detection

Change-Id: Iea04a24e964694dc049a13cecc1544bb979de8d4
Don't change the molecule after you created a matcher

Change-Id: I5b05dc79649c3fd57d48600bd9ea08beed57e84c