Apart from the -260 bug I already confirmed and filed an issue for there also is another quirk I have started discussing with Particle a while ago (3/12/2019).
It revolves around the way how the circular RX buffer is handled and consequently who
USARTSerial::available() calculates the distance between head and tail of it.
@avtolstoy and @rickkas7 are aware of the “issue”, but no public issue has been filed yet AFAICT.
As a temporary workaround, I’d rewrite your code above in a similar way to what we already discussed when we were talking about the -260 bug you found.
while(Serial1.read() >= 0); // flush all available RX bytes
BTW, what baudrate are you running that with?
Is your client device permanently sending or only on demand?