Joe ties Josh's hands together when they set off to meet Ben. When the horse takes off, the close-up of Josh shows him reaching for the rope around his chest with his hands untied.
As Joe is leading a roped Josh away, Josh's hat falls off and they go on without it. When they get to the hide-out Josh has his hat on.
Joe was inline of sight of the posse when he ran off to the ditch, and he was shown being a short distance from the posse's campfire. They would have seen him when he ran and would certainly have looked adjacent to where they set up camp.