Membership 2 Pro API custom code doesn't detect "expired" status

This code was given via chat and it's supposed to detect if a logged in user has an "expired" membership status but it doesn't seem to work:

function is_expired(){
$member = MS_Model_Member::get_current_member();
if($member->subscriptions != 0){
if($member->subscriptions[0]->status == 'expired'){
return true;
}
}
return false;
}

It should return "true" if member is expired and "false" if not expired or does not have any membership, but it returns "active" as the status for the expired user (see details in chat)