the royal apartments were in maegor 's holdfast , a massive square fortress that nestled in the heart of the red keep behind walls twelve feet thick and a dry moat lined with iron spikes , a castle-within-a-castle .