Proof of chain rule on wikipedia: what does this sentence mean? On wikipedia it says the following on the first chain rule proof:

$\lim_{x \to a} \frac{f(g(x)) - f(g(a))}{g(x) - g(a)} \cdot \frac{g(x) - g(a)}{x - a}$
When $g$ oscillates near $a$, then it might happen that no matter how close one gets to $a$, there is always an even closer $x$ such that $g(x)$ equals $g(a)$.  For example, this happens for $g(x) = x^2sin(\frac 1  x)$ near the point $a = 0$.  Whenever this happens, the above expression is undefined because it involves division by zero.

I can see that with the function $g(x) = x^2sin(\frac 1  x)$ when $x$ approaches 0 that the amplitude goes to 0 and the frequency goes to infinity, and also know that by the squeeze theorem $\lim_{x \to 0} g(x) = 0$, but $g(a)$ at $a=0$ is undefined, since $(0^2)sin(1/0)=undefined$, so how can $g(x) - g(a) = 0$ or $g(x)=g(a)$? If the statement is not true at the point 0, but only near the point 0 how can it be shown that $g(x)=g(a)$ at such a point?
 A: It happens to be the case that chain rule cannot handle such functions as you have given.  Let us define here that
$$f(x)=x^2\sin(1/x),\quad x\ne0$$
At $x=0$, we want the function to be continuous so that it may be differentiable, hence,
$$f(0)=\lim_{x\to0}f(x)=0\tag{problem?}$$
which may be observed by the squeeze theorem $(-1\le\sin(1/x)\le1)$.  Now see that
$$f'(0)=\lim_{h\to0}\frac{f(h)-f(0)}h=\lim_{h\to0}h\sin(1/h)=0$$
Again, by squeeze theorem.
But by chain rule, it is easy enough to see that for $x\ne0$, we have
$$f'(x)=2x\sin(1/x)-\cos(1/x)$$
Which is not continuous at $x=0$ for the very reason that the inside function $g(x)$ is not continuous at $x=0$.
It is easy enough to see this problem pop up since it is actually not the case that $\lim_{x\to0}f(x)=0$ over the complex plane.  This is since $\sin(1/x)$ has an essential singularity around $x=0$.
A: Wikipedia article is actually trying to point out a common flaw seen in most usual proofs of chain rule. The typical proof uses the limit expression given in your question and then says that first factor tends to $f'(g(a)) $ and second factor tends to $g'(a) $.  Thus the final limit is $f'(g(a)) g'(a) $ and proof of chain rule is complete. Wikipedia is saying that this does not work when $g(x) = g(a)$ as $x\to a$. In such cases the proof of chain rule has to proceed in a different manner. Wikipedia uses the phrase "to work around this" to show that the proof has an issue which needs to be circumvented somehow. 
When $g(x) =g(a) $ as $x\to a$ then we have $g'(a) =0$ and one needs to prove that $(f\circ g) '(a) =0$ in order to establish the chain rule. 
