We arrived on a connecting (domestic) flight into SFO and had a similar experience that what was safe on the first flight was no longer safe for the following international flight. The bottle in my son's carry-on was full (I'd forgotten it was there or I'd have drunk it) and got spotted at the security check. What was interesting is that the empty bottle in my carry-on was not, so I could have filled it at a suitable airside water fountain.