Fix pending when exception caused in a before/after/around block.
More robust pending assertions.