Fix for JAVA-794 - Fails to detect fields with dots for docs in arrays

I've implemented a fix for this along with tests.