Added an option to avoid exposition of empty public collections.