Fix #441: Improve validity of epub output