Work around a weird kind of Swift bug