Add compat::isInMainFile

Change-Id: I0e155c6c68a43020110a8e1c0cb29cabdcade454