I had a similar problem. I added different SQL scripts to my AIP and received the 1627/2213 error set. I checked around on another thread and discovered that my file names night be too long. I shortened the file names and the AIP compiled without error.
Hope this helps the next victim of 1627/2213 ...
FOLLOW US
Get the latest news in Application Packaging