Fix a bug with Phase Statement detection