LPS-41649 costly operations are repeated during the build causing it to be slower than it needs to be