Test case for PR1271 involving construction of a bad mask to replace a