Executing multiple FrontendActions on a CompilerInstance

I came to learn that somehow, without any extra setup, only one FrontendAction can be executed on a CompilerInstance. See my question here [1] on stackoverflow for the details. What I'd like to know is: is it possible to run more than one FrontendAction on a CompilerInstance and if so, how? If not, why is this not possible?

Note that the second time a FrontendAction is run, an assert failure occurs somewhere in SourceManager and/or FileManager regarding FileIDs or something. This makes me think that I need to reset some state somewhere in SourceManager or FileManager attached to the CompilerInstance, but I am not a clang developer so I wouldn't know right away what the correct course of action is.

See my question here [1] on stackoverflow for the details.

Forgot the link, here it is: http://stackoverflow.com/questions/40717746/executing-more-than-one-frontendaction-on-a-compilerinstance-in-clang