Bug fixes and further testing about equality of node types