Ensure we raise a meaningful error when there is no SCM

Closes #1742
Update code comment