I just ran into a weird issue where Deps.prototype.lookupPackage was called in an infinite loop.
I generated some json files programmatically and one of them was named package.json.
How to reproduce it:
echo '"somefile"' > file.json
echo '"anotherfile"' > package.json
browserify file.json
The file was requireable in node but not in browserify, so the lookup logic probably needs a fix.