Some hacks to remove the dependency on the .scope() helper methods being set.
We attach scopes to element data instead and pick 'em up from there.