Improved three-way blob merging code