For the special case mentioned (no controlling terminal), this is not specific to xterm,
and is unlikely to be a bug in the terminal emulator.
I just verified that I can see identical results with xterm, urxvt, pterm, konsole and lxterminal.
(perhaps vte-based stuff differs, but it's not worth considering due to lack of command-line compatibility)
For the special case mentioned (no controlling terminal), this is not specific to xterm,
and is unlikely to be a bug in the terminal emulator.
I just verified that I can see identical results with xterm, urxvt, pterm, konsole and lxterminal.
(perhaps vte-based stuff differs, but it's not worth considering due to lack of command-line compatibility)