Fixed: The problem was that I used Value.get_variant (), when I should have used Value.dup_variant ().
Value.get_variant ()
Value.dup_variant ()