Is that the query_posts() the real criminal here?

Just put them between endwhile; and endif;