Fix restoring route type and AVP list when droping branch.

Closes #365.

(cherry picked from commit 9e033465cb2328dd10b6e0ac0d09bf92136dfd33)