Actually, scratch that. It fixed the issue on gallery selection view, but when viewing actual photos in the gallery the wrap is still wrong.
Adding the comment form fixed the problem, but this is definitely a workaround. There should be a real resolution to the problem.