The rebuild doesn't renumber posts at all, so you could just restore the posts below that certain id.

Sorry about that, I had totally forgot about how it would have the raw ubb tags, was just thinking about the html.