Have a look at the modified version of your file. 1drv.ms/u/s!AkmrWgxeuxlKhIcr596sbSuJg3Rawg
I've set it up so that the small has instance boolean variables that indicate if it is overlapping to the right, below, and below&right. Then I've put the test for the overlaps into a function that is called when the sprite has arrived at its moveto location.
You only ever need to check for the offset at those three positions because if four squares are together that condition will always exist.
You can change when the function is called to suit whatever your game is about