BZ-1047789: fix in order to be able to have consistent building flag state