Add entity_type and bundle to theme('flag') call in _flag_onclick().