Allow masks on group layers
When copying a mask to the clipboard, the masks are added to a
default, empty image. That means, to a group layer without a
parent. This is perfectly fine, but we have never allowed it
before. The only important check is whether the root layer already
has a selection mask, the global selection.
BUG:397796