The upper rails being at the same level are normally made using stub tenons, although not being through tenons they won't show. If you want to see both the upper tenons, then the suggestion I'd make would be to use a crossed bridle joint in the tops of the legs and notch-out the "tenons", thus...