Add changes from 1.8.16.
Added changes from Elgg 1.8.16.