Fix pattern matching in deprecated value removal handler

--HG--
extra : rebase_source : 2d738e7714974c723713425ef809551f5ae60847
Added flag to enable/disable deprecation handling for backward compatibility

--HG--
extra : rebase_source : 7356cf9a7fc64b1ed109eb6c98d979916650feb6