CIDs are not supposed to be in any particular order - they are connection IDs. An ID is usually a unique identifier to identify something, hence the name ID.
Whilst the behaviour may have changed, connection IDs were never supposed to be in any particular order. To do what you want, use $scon() instead of $scid()