This script has issues with tiles that have transparent pixels.
Click image for larger version. 

Name:	j5.jpg 
Views:	66 
Size:	17.5 KB 
ID:	99866
Click image for larger version. 

Name:	j6.jpg 
Views:	75 
Size:	25.2 KB 
ID:	99867
I was thinking maybe creating the shuffled tiles in a new layer would fix it? Does anyone here know how to do that?