Fix a secret compiler bug in patcher

#5474