As the title says

I could only reproduce this if I really messed with the stations. If you connect a station back to front it will count as only 1 piece long. I think that is what you have done.
Yeah, that's correct, I accidentally connected it back to front, sort of a bug but not so much, a bug because of the game only counting the station as 1 block long and not longer.
I'm getting additional weird behavior in OpenRCT2 (as of build 1510).
I start with a very simple chairlift ride, three station pieces followed by three straight pieces then three station pieces again. The ride is able to be tested as expected.

When I edit the middle section to connect to the "back" of the second station, I get different error messages depending on the version.
OpenRCT2 build 1510

Vanilla (GOG Triple Thrill Pack)

The vanilla game offers more info in the error message, even though it's not necessarily more useful.
In both of these cases, I'm able to select six or seven chairs as opposed to just one, signalling that there may be two intertwined issues at play.
Solution is to not do that.
"Don't trigger the bug" isn't the same as fixing the bug.
@duncanspumpkin : A strange answer. The screenshot shows a configuration that should be valid, yet shows an error. That is a bug, and should be fixed.
Perhaps @duncanspumpkin means there is currently no work around until the original bug is fixed.
Well the issue seems to be that the checking code can't handle the station pieces being (technically) reversed. Not sure whether that's currently solveable.