Make buildArgumentFromTypeHint use shared classes

If you shared a class for some reason and you try to make a new class with a dependency to that shared class it wouldn't use the shared one, this change request fixes that.