BUGFIX: Group->Parent seems to return non objects sometimes.
Apply patch for many many_many

from: http://www.silverstripe.org/data-model-questions/show/18329
last post references patch here:
http://assets.simon.geek.nz/text/k
BUGFIX: Force all tree nodes with children to have 'children' class.
SECURITY: Escape field value for SQL