Add new isBidirectional function for generate-all
Remove map caches