optimizer can't inspect the value? pretty dumb optimizer, then.

It's not "the value", it's "the values".

Running the optimizer for every execution of the same query is... not very optimal.