Guard against lightbox /undefined URLs (XF core defect workaround)