That was a good idea - I updated to 5.3.4 and the error went away!
But, now I have a new one: I was intending to use Is Scene Valid to check if a scene exists in the project or not, but it doesn't seem to work like that. Even if I write the correct scene name, and check that it's in Build Settings written exactly like that, the isValid result is always "false".
To debug, I temporarily changed target = SceneManager.GetSceneByName(sceneName.Value); to target = SceneManager.GetActiveScene(); and then everything worked as expected, so I think the GetSceneByName is the culprit here.
Did you happen to test this yourself? Should it be possible to check if a scene exists, or is it intended for something else?
EDIT: By mad googling I found out that the IsValid() only applies to loaded scenes, i.e. a scene needs to be loaded to be valid.