The method is huge and while it has comments describing its big sections (walking history back and forward again), it's hard to understand what happens in detail (even for me, and I wrote most of it).
Metadata Update from @nphilipp: - Issue assigned to nphilipp
Commit 0016cfd4 fixes this issue
Commit 78d55a81 relates to this ticket