Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2252100 and https://bugs.ruby-lang.org/issues/14582