MDL-67861 core: Use last ip in X-Forwarded-For list