Otherwise we get assertion with GI 3.18 Differential Revision: https://phabricator.freedesktop.org/D386