Well, factor in a slow extinction event and let it run for a few billion ticks. That way they have ample warning, and they might have even offed themselves within that timeframe.
True, but that law was established to discourage any research in that domain, reducing the overall occurences of sentience-incidents and the resulting messy philosophical questions.