Fix $replace parameter handling in get_config()

Code was reached only on first function call, then short-circuited due to the reference cache.