=str #15892 Fix ClassCastException in ThunkSource

* and add test