Why this assertion fails?