bugfix: primitive_cast broke some container/tests