Hezekiah Niles, writes, in Niles' Weekly Register (10/21/1826),
Niles was probably not the first person to express that economic fallacy, nor has he been the last. Keynes said we owe it to ourselves," by way of excusing public debt. Yes, you can be pedantic and say that yes, literally, had the canal been paid for with dollars that had "New York" written on them, only a few of them would have been initially spent or taken out of state. But that's not really Niles' point. His point is that it literally didn't cost anything, just like Keynes' point is that public debt doesn't cost anything because we're just paying the interest to ourselves.
This all is yet another flavor of Bastiat's broken window fallacy. In this fallacy, a vandal breaks a window, and creates employment for the glazier. And yet that doesn't make sense, because the world isn't made better, and more people aren't employed by destroying things. The key is what is seen and what is not seen. What is not seen -- and it's hard to see because it ends up not existing -- and not seeing is not believing -- is whatever the homeowner would have done with the money besides repairing windows.
Similarly, what Keynes and Niles miss is what would have been done with the money had it not been spent on a canal, or borrowed and spent by the government. Don't be fooled by "We owe it to ourselves."