Semantics is not yet run on the SIZE identifier, so dmd does not know, it is const. The patch invokes semantics if not yet run.
Index: optimize.c
===================================================================
--- optimize.c (revision 421)
+++ optimize.c (working copy)
@@ -47,6 +47,8 @@
Expression *e = NULL;
if (!v)
return e;
+ if (!v->originalType && v->scope) // semantic() not yet run - BUG 461
+ v->semantic (v->scope);
if (v->isConst() || v->isImmutable() || v->storage_class & STCmanifest)
{