function isSelfReference(ref, nodes) {
			let scope = ref.from;

			while (scope) {
				if (nodes.includes(scope.block)) {
					return true;
				}

				scope = scope.upper;
			}

			return false;
		}
Determine if an identifier is referencing an enclosing function name.
@param {Reference} ref The reference to check.
@param {ASTNode[]} nodes The candidate function nodes.
@returns {boolean} True if it's a self-reference, false if not.
@private