Isn't the simpler conclusion here that one should look for the signature where it is supposed to be? Instead of using an excessively general XPath like "//ds:Signature" that might find any signature in any unexpected location...
replies(2):
The nature of web software is 100 times riskier than anything else because of the risk profiles and 100% connectivity