Fix incorrect undefined check

As seen in 703cc93