Fix introduced bug with indexing of views.