fix Task #13175, bug in the javascript that collects the auto tags

needs testing/confirmation