Fixed (#841)

This is a fix for #841 and supporting test.
* create new branch at your current dev head
* reset dev to upstream/dev head
* create new branch at dev head
* add Theory, commit
* cherry pick green commit from old branch