Sorry to reopen this post from a year ago, but upon testing, I think it might have to do with the light variable z; if it's too low, your light might be obscured.