[xmltv/f39] Pull in selected patches from upstream from v1.2.1 to commit 3711b00137