Unit tests for #633