Make the getTargetBlock respect range.