Fix xpath indexing for non-existent attribute value