Fixed handling of value types (e.g. structs).