G_GNUC_END_IGNORE_DEPRECATIONS terminates the if statement and does not consider the following block to be part of the if. So that block was always taken irregardless of the pattern. Fixes #1280