OK the changes that broke HEAD have been rolled back, I re-installed, then installed and mounted the "notes" package (which I recently modified to use ad_form and its key management feature).
Works fine ... can you try your code again to see if it works with the current version of ad_form in HEAD or not?
TIA ...