Test and possible workaround for Astropy #2749

See astropy/astropy#2749