Fix bug introduced a few versions ago.
Merge remote-tracking branch 'upstream/4.1' into 4.1
tests and collection