You're right that I can optimize this in the case where the modes match, because left will always be zero in that case.  Change coming.