What planet isn't a closed system but sometimes appears to be because of the approximate conservation of matter?
Matter should not be confused with mass, as the two are not quite the same in modern physics.