Corrects support for subclass overriding "target" in Serialization
# Changelog
- After class resolution of `target`, if calling `cls` is subclass of resolved `imported_cls`, then defer to subclass `cls` instantiation instead of the imported target class.
- Add tests to check these scenarios

Signed-off-by: smajumdar <titu1994@gmail.com>