Fix that when a variable with ttl=0 was created it was deleted directly afterwards