Fix @meets_deadline.

Makes @meets_deadline and friends check that a permission is valid
(unexpired) before using it.  Note: the line of code this edits should
arguably be removed entirely, but that may require some discussion.

(Also made a pull request to main; will merge this one immediately.)