More avoidance of capturing stale xc handles

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>