At first I thought it was an ACF problem, but printing some values helped me to find out that somehow my Loop seems stuck on a single post, but only when some fields are concerned.
To sum up my setup: I have installed the Advanced Custom Fields plugin and defined some custom fields (mostly numerical ones), on which I built custom post types.
The first occurence of the problem apperead while I was developing an archive page for a custom post type: I got everything working but a few fields returned always the same values, those related to a specific post (post number 50). After some attempts to fix the code (which led to this question) I left the archive page behind and started working on the single page. Then, again, most of the fields worked fine, but a few (the same few of the archive page) kept returning always the same values (again, the values from post number 50). So I started printing out the post ID, and every time I call
get_the_ID() I always get 50, even after I deleted said post, in a pretty useless attempt to get rid of its values.
I think it's a bit strange, but from the behaviour I'd say that the loop is somehow stuck on the same post, no matter where I call it.