Tweaking the check for REDIRECT_URL in tumthumb.php. Should fix #1006, hopefully.