In the process, add some tests and do some renaming on the existing ones, and remove the workaround for #2228, will be solved appropriately in a follow-up commit. Fixes #1836