Create gateways from scratch, use renamed original function internally.