Fixed location of reported deprecation errors

--HG--
extra : rebase_source : 0199c44fe99e1ae87f598628e01e5b063cb1a54f
Fixed handling of deprecations when warning messages have been disabled

--HG--
extra : rebase_source : 4c1a1868e30e4f407fa076d5656a5bc9889b3f0d