Index should be checked before indexing m_dlls
Merge pull request #2207 from asmaloney/for_loop_check_order

Index should be checked before indexing m_dlls