Default value mechanism in Lua using metatables
If you comment out secondSubTable from actualTable in the testPropertyShadowing test and run it you get an error because you cannot index a number value.

The problem is that you are assuming that the replacement value will be index-able but not all values are. Tables, strings and custom userdata can be indexed but functions, numbers, and nil (by default at least) cannot be.

You might want to consider checking for the default being a table (testing for userdata requires trying it in a pcall I believe and is probably not worth it). Alternatively, you could leave it alone and let people use anything they can index and keep both parts if they use something else.