I don't remember the initial problems from 12 years ago, maybe it was GTK2 releated or a bug in early GTK3 versions or so.
Any chance you could try removing the guard and see if anything weird happens? Not that I remember any details about that though, only Git does remember anything :)