Gallery: Fix sharing non toplevel galleries