Added support for infinite forwarding of restore commands in undo/redo
scenarios.

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