Moved isDeleted() check down to avoid information leakage in thumb.php

Change-Id: Idcbf79ef7c82f5bcf3c0ab1002fde2201d81313f