Fix CodeSample.fromElement() when code defined as an attribute.
Fix CodeSample.fromElement() when code defined as an attribute.

foam-framework/foam,jacksonic/foam,jlhughes/foam,osric-the-knight/foam,foam-framework/foam,jlhughes/foam,osric-the-knight/foam,jlhughes/foam,foam-framework/foam,osric-the-knight/foam,jacksonic/foam,jlhughes/foam,mdittmer/foam,jacksonic/foam,jacksonic/foam,foam-framework/foam,mdittmer/foam,osric-the-knight/foam,mdittmer/foam,foam-framework/foam,mdittmer/foam