Yes, however, the documentation would be a lot clearer if it said "copies all constraints except foreign keys". I've made this known.
At any rate, I've attached a new version of the function that now does copy the foreign keys. Let me know if I missed anything else.