Merge pull request #387 from andrewvaughanj/fix_scopes

Ensuring that we do not create double frames when creating a new frame (closes #385)