Handle SG's pointing to other SG's

Closes #4.