This is precisely why I think a gov't run research effort is the right way to handle this. You don't want to grant a new patent on the existing drug just because of new use of it. That would prevent the generics being used for the original purpose. So if the bigPharma company that created it for original purposes does not want to spend money researching alternate uses, then allow the gov't direct the research in the name of keeping its citizens healthy.
Unfortunately, that doesn't really stand up as a great solution with using the current administration as an example of what happens when you get anti-science mindsets in charge of things. It also helps to have a gov't that is empathetic for its citizens which does not always happen.