Simplified all this logic.  Basically, it will skip stamping urls (stamp_url) unless an exercise (related videos only), video, or bottom-level topic.