Slightly reorder lookup_item to hide cache latency
Optimise duplicate label checking for large numbers of statements