Fix the types for scopes/indexes

/to @ritch 

See https://github.com/strongloop/loopback/issues/562