Fix Issue #319: dialog:autofocus was being called on last instead of first tagged element