Fix failure of parameter overwrites in some cases

Some overwrites would fail raising a type mismatch error. See the
test: test_complex_overwrites_1 in test_parameters for one such case
4 files changed