Now, this is interesting....
I did a google on "indigestible hats", and came up with a surprising number of hits on the topic! So, given that, let's look back at the movie for a moment, shall we? We saw the Pearl go down, yeah? Broken and all that by the Kraken, yeah? Did we see Jack consumed by said beastie? No, we did not. Engaged in battle, tilting with the ultimate windmill, should we choose to extend this Don Quixote metaphor much farther. The ultimate final act of defiance. We'd expect no less of dear Jack.
His hat was indigestible. No doubt, with his personality, and all that paprika he tossed under his armpits, he's indigestible as well?