This is because type equality is not preserved through pickling. (Similarly for any other dynamic types that can't be pickled by reference.) Imported from Jira [BEAM-14250](https://issues.apache.org/jira/browse/BEAM-14250). Original Jira may contain additional context. Reported by: robertwb.