Turns out that the changes in May are (mostly) correct. It is illegal to use check_yes_no() outside the GUI, for example in the kobo device driver. It worked by accident.
Replace the template with
Code:
program: $#kepub == 'yes'
EDIT: by "mostly" I mean that it detects a real error but gives the wrong message.