Shouldn't one of these `#endif`s be removed?