Dynamic layer indexing