How to fix Citrix Receiver for Windows when using NetScaler Gateway and StoreFront with backend HTTP

I came across an interesting issue with Receiver 4.6 for Windows the other day where I could not add a NetScaler Gateway URL to the Receiver.