Fix type checking issue in core/scope.js, v0.6.1

Seemed to contribute to some random crashes when loading certain
pages.