Group files when the entity reference pre-populate doesn't take affect.

Relate to issue #1660