fix context of ensureIndex callback