better handling of nested constants