It appears that this is an optimisation problem caused by me removing the jedi-sdl.inc file and rebuilding. Something was going horribly wrong. I pasted the code from the jedi-sdl.inc file into the top of sfont.pas and sdlutils386.pas and did a clean rebuild, and it works again now.