a better unframed_cast_encoded, fix unframed_cast_test_get