This is an issue for the problem described inhttp://forum.civicrm.org/index.php/topic,3949
When exporting or creating a smartgroup from an advanced search, all contacts are returned instead of the selected ones, if the search included at least one custom field.
Let's say I have 300 contacts in total and my search results would be 14 contacts. When I do the advanced search and select the "all 14 records" option, and then export to csv, I get a csv file with all 300 contacts. However when I select those 14 contacts and then choose "selected records only", I do get only the 14 records.