Minor optimizations in indexer