The builder structure should be now easier to understand and easier to avoid such problems in future. Fixes #6546.