Wondering if in the case of steps behind document-end not rather null should be returned. At least in some of the (indirect) use-cases it might make sense to signal that the steps parameter was out-of-bounds, thus something wrong.