Splitting off some refactoring from other renderer work that I thought would be
useful. Callers of mask_id should check is_masked_group first, so this rolls
the two into one. Whilst we're here, it also removes the reference from the
Uuid type (`Option<Uuid?> -> Option<Uuid>`). It's cheap to copy and a few call
sites will need to copy it to satisfy the borrow checker anyway.