fix DeprecatedContainer

It was correctly emiting deprecation warnings, and invoking the correct
container methods, but was not returning there result;
Merge pull request #2621 from stefanpenner/fix_deprecated_container_with_tests

fix DeprecatedContainer