linters: check for overwriting xflags (AL36)
This logic will be used more often for different types of variables, so let's make a function for it.
This logic will be used more often for different types of variables, so let's make a function for it.