Improved mergevars in setTo()