Check if key exists before iterating through dot-notation.

Allowing for array keys to contain "dots" to detect flattened id/value pairs (e.g. used by Symfony's Translation Component).