common: fix (again) support function that wraps particle positions