Added unit test. Implemented a quick fix for the issue with a broken branch-off algorithm which disregarded the transaction boundaries in the undo.data file.