detect delegation loop