Add simple loop detection to despf.sh