Fixed serialization of calculated key expressions