Fix java Regex behavior with empty matches (fixes #156)

All 2.11 tests and partests pass