Minor optimizations for metadata lookup