OK now it is tested, your patch works:
Jan 26 15:04:42 TW-U vdr:  channels-1: channel 1 (Yle TV1) PID-mod = 42: changing pids from 512+512=2:650=fin@4:1027=fin,1050=dut:5000 to 512+512=2:650=eng@4:1027=fin:5000
Jan 26 15:04:43 TW-U vdr:  vdr-1: channel 1 (Yle TV1) modification = 42 : currentChannel 1
I have 2 debug loggers that show what happened. Before PID modification 0x42 would have caused switching.
Well, this is a very old bug, from some reason Finnish TV started changing PIDs of their channels very often so it became annoying only lately, before vdr was restarting not very often.