This is really following the recommendations in the RFC (so I'll see if I can add a reference and a better comment).  The idea is to only strip the extra header if we are as sure as we can be that it's there because we did a double Record-Route.  We wouldn't do a double Record-Route if the port and transport were the same on both sides.