Memoize compatible grammars on PoOT object

This way it only calculates once.