Closes #2153177
patch from comment #80 converted to merge request.
Mentored contribution at Drupalcon Rotterdam - fire alarm went off.