FIX: Close each global brain in doc gen