Spain were gifted an early goal in their Nations League game against Switzerland as a poor pass from goalkeeper Yann Sommer allowed Mikel Oyarzabal to score.