There was a refcounting bug caused by TryGetLazyValue which resulted in premature destruction of the internal instance holding the lazy value.
I fixed that in the develop branch.
Also FWIW your TStream serialization is missing setting the Position to 0 before passing it to TNetEncoding.Base64.Encode.
Furthermore, you could add an additional check on TStringStream and directly pass its DataString to the TJSONString