Core/Objects: Some optimizations to object updatemask building