The -4 dex penalty incurred from having the grappled condition should not affect dex bonus to AC. The combat page on d20pfsrd.com gives the following clarification "Grappling Contradictions? There appear to be some contradictions between various rules on grappling. What is correct? To sum up the correct rules: Grappling does not deny you your Dex bonus to AC, whether you are the grappler or the target."