consider to and from when assigning to and from `Dynamic<T>` (closes #3461)