Solved the bug that caused the rtkUpsampleImageFilter to freeze when
multithreaded.