Fix caching on assignment
I made a mistake by adjusting the early assignment inside the variant
method. It used to not early return because it wanted to cache the value.
I've adjusted it to cache the value on assignment, but I feel like this method should be a priority for a quick reworking to make it more understandable.