Move last-comment check to appropriate location