ReflectionHelper's isFirstEntryInArray properly handles empty arrays

Issue: SPR-12522
Polishing