# Why does flux remain constant on changing the inductance?

I got the above question when I came across the following problem.

A current $$I_0$$=1.9A flows in a long closed solenoid. The wire it is wound of is in a superconducting state. Find the current flowing in the solenoid when the length of the solenoid is increased by $$\eta$$=5%.

At first I thought that the total energy stored in the solenoid(i.e.$$\frac12Li^2$$) does not change.But I soon realized that approach is incorrect as in changing the inductance of the solenoid one has to do work hence the energy of the solenoid changes.
After thinking a lot about I looked at the solution.
In the solution, it says that the flux through the solenoid remains constant. Following is the solution: $$\phi=Li=constant$$
But for a solenoid $$L=\frac{\mu_0N^2s}{l}$$where N is the number of turns, s is the area of cross-section and $$l$$ is the length of the solenoid.
Now as we can see $$L\propto \frac{1}{l} \implies i\propto l$$,
so we get $$\frac{I_0}{l}=\frac{I}{(1+\eta)l}$$.
Hence final current is $$I=I_0(1+\eta)$$.
This is where I am stuck because of two question:

1. On changing the length of the solenoid we are probably increasing the number of turns in the solenoid, which is not considered in the solution.
2. Even if I agree with above approach to solve the problem, then we are changing the current in the solenoid then how does one knows that the flux ($$\phi=Li$$) linked with solenoid is not changing when both the current and the inductance of it are changing.
I would be glad if someone explains it to me.