TW-33790 Refactored decision-making process. Not using build parameters anymore. Getting state directly from build features
(cherry picked from commit 8e2fa2d)