Troubleshooting mysterious conditional that php seems to hate