Unit test to reproduce #179

(cherry picked from commit bee2709f2ecd4397fea173c90b49642ee0b8f955)

(From #294)
Fix CommandBuilder event registration

CommandBuilder wasn't properly registering to its DataAdapter
events, resulting in bug #179

(cherry picked from commit 9940744cb70695bb8159916b52ffee8340bd01cc)

(From #294)