I have managed to find out the problem. It was not the code nor the template itself, it was actually a hidden <DIV> in the DESCRIPTION of a property!
The text has been copied over from somewhere else and I had to switch to HTML view of the description to notice the <DIV> inside it. Therefore, the actual text containing that <DIV> was the problem.
As such, please accept my sincere apologies for your time. I was wrong, it was not the module that was generating the problem so I would like to apologize once more.
I do have one final question though:
Please take a look at this:
Is it normal for the gallery to align the images this way ? I mean, is it normal to not fill out entirely the second row ? It seems like there would be room for two more images there yet it skips to another row.
Unfortunately your sample does not have properties with as many images so I can't tell if this is normal or not.
Could you please let me know if this behavior is expected ?