Fixes https://github.com/pyrocms/pyrocms/issues/3130