BZ-1019473: checking for null matches to avoid NPE on 'from' node