Fix for #54, missing defs

This pays attention to "definition" nodes that begin with a paragraph marker and fixes the logic which causes longer terms (which may contain shorter terms) to be processed first.