I wouldn't have worried about running a 5w40 in the 4.0l - plenty of results showing good things running it. Besides the fact the motor design is basically ancient! My '88 4.0 allows anything from 5w20 to 20w50, so an xw40 isn't going to hurt a thing in there.
The Wal-Mart Syn will be fine for 5,000 miles in the 4.0 though - just about any old oil will work fine in that!