Fixes indexing of empty views.