Better handling of common source roots for modules

Testing Done:
manually

Reviewed at https://rbcommons.com/s/twitter/r/1103/