Added caching on layer count for index