The point at which you left the airport without dealing with the issue was when it became unrecoverable.
In the morning, I suspect the flights were all booked up until the one you got on.
The customer service agent should have been less stupid, but YYZ is one of those places where you can "HUCA" in person really easily.