Fix all autotests related to value types

Fix 3 bugs in the new implementation, and adjust two expected error
messages in the auto test.

Change-Id: Ic3c08e54f9babc7e4779d67829e36f3ff805e127
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Smaller cleanups

Change-Id: I7c3ec27b2910a98f667d13011192cbe57bb1d7c7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>