{% if loop.first %} and {{ loop.index0 }} not working with Matrix
At the moment loop.first and loop.index0 are relative to your block.image loop.

If you want them to be set based on your entry.locationSlideshow loop (the parent loop) you can use {{ loop.parent.loop.index0 }} and {{ loop.parent.loop.first }}

For more information see the Twig documentation.