Fix conditions for applying full multiplication optimization