Form Issue After Upgrade to v17.1 64-bit from v16R5 32-bit

After upgrading from v16R5 32-bit to v17.1 64-bit, one of our previously working forms is exhibiting a strange behavior.

The On load and On unload form events are being fired repeatedly, causing the form objects to appear and then disappear over and over.

Does anyone have a suggestion on how I can debug this? I’ve tried using the SET DATABASE PARAMETER debug log, but it is so verbose I can’t make heads or tails out of the output.