In the dev-version of your fine module this function has had 2 parameters:
function references_dialog_process_widget(&$element, $form_state) {
In beta2 it lacks the second parameter:
function references_dialog_process_widget(&$element) {

The call (inside form_builder() in drupal-core) includes the $form_state as parameter:
$element = $function($element, $form_state);

So it comes to some hard to find misbehaviour...

Greetings from Cologne !

Comments

kle created an issue.