Fix handling of mark exhaustion