Cleaner / more concise / more "proper" version of the fix done in 1b325a5.

Note: This fix introduces a BC-break.