node.py: fix error in querying tags

Thanks to Matt Berck for reporting.