builder: handle cases where onbuild is not uppercase.

closes #8675 

/cc @tiborvass 
I don't think that we have containers here.