Avoid javascript errors in AMremovebrackets from childless nodes. Bug and solution via lwz on Google Groups.
Fixes #24.