Test static sealed trait case

This test fails I think due to https://issues.scala-lang.org/browse/SI-7046

The first commit improves the error message when we aren't able to unpickle
due to not recognizing the type tag. (Without the commit, it causes a MatchError,
which is pretty cryptic)