Revert "Revert 'Make tests for #1261'"

This reverts commit 3b2503a7d5abb03e99437d075eda31e16896a4f2.