Cut source down to bare minimum needed to reproduce astropy/astropy#2418