In order to build core tests, there cannot be any hard coded GATEWAY flags (like MY_GATEWAY_ESP8266). These needs to be set in the sketch that implements the gateway.
Fix fix avoids loopback of messages from controller back to gateway.