fix decoding of multiple attributes (fixes #7017)

We were just looking at the last because we were overwriting ret.
add test for RcMut being Const and Owned, tests #7017 being fixed