window/x11: Try getting the associated group of window leader first
Otherwise we would try to create a new group later on which would crash
Fixes #3329 (closed)
Otherwise we would try to create a new group later on which would crash
Fixes #3329 (closed)