If you compared the story in the original post to the your hypothetical, it would have been that you walked into a house with the intention of shooting someone, and walked into the wrong house and shot the wrong person by mistake. In this case, both would usually be illegal, so your hypothetical doesn't really work. Maybe if the original said that either swamp was baited, but that wasn't it. If he had walked into a baited swamp, and found some ducks that had been shot, then called the warden, then he wouldn't have been poaching and that would be like your scenario, but that's not what happened.