I finally found out the problem!

I had to change procedure Whatever(pHeightmap: array of Byte) to procedure Whatever(var pHeightmap: array of Byte) in a couple of places. I couldn't imagine that would make so much of a difference, but after thinking a bit it seems logical.

Now I've converted both tutorial 1 and 2 to delphi (multitexturing in tutorial 3 doesn't seem to like me) and I'm thinking about maybe uploading them somewhere somehow when they're finished.