Fix setting of sourcepath

This updates change applied in a8377d49dfa2c50e72a9159bc6d1c854c6a83e8d
to work in more scenarios.
1 file changed