Fixed how dynamic flags should behave when not yet locked
This is simple fix that makes dynamic* flags to depend on the possibly changing values of other flags until the whole flags container is locked. Also the assigned new value is allowed to be a function. *(those with the default that is a function)
Tagging @wlampl @goetz @iyeletsk (related to !35041 (merged))
Edited by Tomasz Bold