NXP-10851: do not call refresh if it's not needed (to avoid stackoverflows in some DAM use cases)