@josh
I understand, for some reasons you're not willing to publicize the code. But can you write a demo showing that issue? I personally believe the bug is not in the code that you just provided. If I have the case like yours, I will do things like these:
01. Make a backup of the project
02. Remove one unrelated form/unit
03. Compile and run
04. Go to step #02, until only the form and necessary units that showing the issue
05. Remove one unnecessary component on the form
06. Compile and run
07. Go to step #05, until only the necessary component that showing the issue
Now, you get the 'fat loss' version of the project that can show the issue. So you can continue:
08. Try to compile and run the code on different Lazarus/FPC versions
09. Try to compile and run the code on different OSes
If the problem is not reproducible on step #08 or #09, then it should be widgetset/OS-dependent/compiler's issue.
But if the problem still exists, then I will one-by-one replace the forms/units by writing the new ones. Because by regenerating them, I may find some typing or logic mistake that I previous made on those old code.
But if still can't find the answers, I will set lots of debug things to see where goes wrong.
Bugs can hide in anywhere of the code. Debugging a big project is difficult, so to make it easier I usually will do the 'fat loss' first.