Make dictionaries contain Root<T> values instead of JS<T>, ensuring that they will not be collected while the dictionary is alive.