Remove doubled up code for adding slspath variants to template context

Looks like a simple git merge fart that resulted in the same code block
being pulled in twice.
Merge pull request #17112 from sbworth/templates-sls-double-fix

Remove doubled up code for adding slspath variants to template context