Index is reset for every layer command