This is not a legitimate API call (calling XBLs from GEL isn't an action that would be supported).
So I suspect if you find the script stops working after the system has been restarted, is because the XBL in question isn't yet in the CA PPM global memory cache on that server/node. "Flush all caches" type operations could cause similar issues even without a restart.
If that is the case, you will need to find a way to use the XBL via the UI (or on the bg service, more likely via an appropriate job or report that uses that XBL) in order to get it loaded into the cache first.
This is not very robust however.