In this earlier question the OP asked the following problem:
Given a rectangular grid where some squares are empty and some are fille
The first thing I would do is make a third state: "empty, but unreachable". You can easily prove each tile unreachable in l*w*m*n time (where l is length of the world, w is width of the world, and m and n are dimensions of the tile). This will reduce your space such that any empty tile is reachable. Note that you may have islands of reachable tiles. The simplest example of this is that the world is cut in half. This lends itself to a recursive effort where each island of reachability is treated as a world in and of itself.
Now that we're dealing with an island (which may or may not be square) you essentially have a special case of the 2D knapsack problem, which is known to be NP-hard (citation under Previous Work). Yours increases complexity of the problem by adding fixed positions in the knapsack that always filled, but reduces complexity (slightly) by making all packages the same size.