Customize visible header flags take 2

Hi,  

Sorry about the buggy patch last time.  That was my inexperience with the subtleties of defcustom.  This patch has the same behavior and nearly the same code and is better tested.