Don't let abdexp graph generation get into an infinite loop.