Fix bug when spinner is created every time progressbar is displayed
[Fixes #4065]