Cleanups and preparations for true branch merge detection