The code here:
in the member function:
there's a loop whose body calls hasSourceManager() on line 669.
It's not obvious to me that executing the loop would
change the result of hasSourceManager; hence I'm wondering
why this test couldn't be moved outside and before the loop?