Links on site adding index.php in URL
I had the same problem.

I have a view with links to content, where the URLs are item/[one content's field value]. One day, I watched the view as anonymous user and noticed that these had been changed to index.php/index.php/item/[one content's field value]. (On the other hand, when I visited as administrator user, it didn't happen.)

I didn't know why it happened, and it was solved by executing drush cc render.

However, the problem would still be left.

The environment is Drupal 8.3.9 and PHP 7.0.25.