Hide all of #main if list is empty, not just children

This matches the original functionality more closely.