Fix #1284
(cherry picked from commit b5e6f80a013039ab59de44f67393e2b39bb02060)
Fix #1284 (2)
(cherry picked from commit 4baad63f6efcf206f72d65fdab3dd5329a5b33ab)

Conflicts:
	ext/tag.c
Regenerated build/ [ci skip]
Merge remote-tracking branch 'upstream/1.2.4' into 1.2.4
Merge pull request #1287 from sjinks/1.2.4

[1.2.4] Fix #1284