How does the magnetic field gain energy through the induced non-conservative electric field? This is a further question derived from this question about storing energy in an inductor.
The accepted answer showed that, during the current increasing, it is the induced non-conservative electric field that does the work. Magnetic field will not do work directly. 
But it is magnetic field which gains energy during the entire process, as is shown in $W_m=\frac{1}{2}Li^2$ .
My question is: 
 How does the magnetic field gain energy through the induced non-conservative electric field, if it does absolutely no work at all?
 A: You are correct that the current doesn't do work directly on the magnetic field. But it does work to the "system" (the electromagnetic field). It does it trough the changing electric field induced by this changing magnetic field. The electromagnetic potential energy gained through this work remains stored in the magnetic field once it stops varying and the changing electric field disappears.
A: From the Lorentz force law, the Lorentz force on a particle with charge $q$ is given by
$$\vec F = q\left(\vec E + \vec v \times \vec B \right) $$
Clearly, the magnetic force cannot do work on the particle since the magnetic force is always perpendicular to the velocity of the particle.
Now, consider the case that $\nabla \cdot \vec E = 0$ and that the magnetic field is changing with time
$$\vec B = \left( B_0 + \beta t\right) \hat z $$
It follows that
$$\vec E = -\frac{s\beta}{2}\hat \phi $$ 
For a charged particle constrained to move along a circular path in the $xy$ plane and centered on the $z$ axis, work will be done by this electric field.  If the radius of the circular path is $R$, the magnitude of the work done by the electric field on the particle during one revolution is
$$|W_E| = q\pi R \beta $$
The above is simply to show that, through the (non-conservative) induced electric field, energy can be transferred from the magnetic field to a charged particle even though the magnetic force has done no work on the particle.
So, it should not be difficult to see that, in the case of a changing electric current, energy can flow to and from the associated magnetic field via the induced electric field.
