Added usage of the new transaction infrastructure when cloning and
deriving.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>