Fix: proper use of in array vs. isset in utility function

Also removed extra whitespace, and renamed local variable.

Resolves #941