Detect self-reference of source