Fix deprecation handling self-test