core: Fix matchFirst and clean-up NETWORK pattern.