Fix an issue with ignoring custom module nodes, add more tests