Refactor require_current_chapter filter