refs #16319, thanks to bmispelon for the catch
Thanks martinogden for the initial patch and d1ffuz0r for tests.