Clone new flags from existing ones when updating

In updateProperties(), dont' start with an empty set of flags, but clone the
existing set and add/remove values from it.