Error C4426 in our project

Hello,
We are getting the following error in our project.

error C4426 : optimization flags
changed after including header, may be
due to #pragma optimize()

I am running Unreal Engine 4.12.5 in DebugGameEditor and have been getting this error on Visual Studio 2015 Update 3
The UE4 project compiles fine on its own so its definitely due to something in our codebase or due to VS optimization flags but I dont know what could be causing it. I came across this Visual C++ What's New 2003 through 2015 | Microsoft Learn and searched if there are any #pragma optimize that could cause this to happen.

As a temporary solution , I have disabled this in WindowsPlatformCompilerSetup.h so that we continue compiling and running the game. But I would like to understand why this is happening.

Is anyone else facing this issue?

-Jitesh