Patch Set 2:

I added some predecessor relationships and divided the original change into multiple ones just to make this change better reviewable. The set of all related changes lead to nearly the same state as changeset #1 of this one.