builder: handle cases where onbuild is not uppercase.

closes #8675 

/cc @tiborvass 
I'm not sure, but can this be just `original = original[7:]`?