The court should rule in favor of what the law says, which is that making and distributing copies without the permission of the author is copyright infringement. If you think IA is morally in the right despite violating the law, the place for that to be fixed is in the legislature, not in the courts.
That would be the neatest solution in theory, but is somewhat hampered by the practical reality of how legislation is written and passed. Part of the reason https://en.wikipedia.org/wiki/Jury_nullification is a thing.
There is no causal connection at all between the two, insofar as the former even refers to anything specific.
I never saw IA on the same level as libgen, which is just straight piracy