Remove dead code.
Add an additional test for dynamic_cast.